import http from "@/utlis/http/http.js"
import env from '@/utlis/env.js';

import {
	post2,
	post,
	get
} from '../utlis/http.js';

// 发送验证码
export function sendCode(phone) {
	return post("auth.login/sendCode", {phone})
}
// 验证码登录
export function codeLogin(phone, code, phoneKey) {
	return post2("auth.login/codeLogin", {phone, code, phoneKey})
}

// 用户协议
export function userAgree(type) {
	return get("auth.user/agreement", {type})
}

// 获取用户信息
export function getUserInfo() {
	return post("auth.user/getinfos")
}
// 手机换绑
export function updatePhone(phone, code, phoneKey) {
	return post("auth.user/updatePhone", {phone, code, phoneKey})
}





//获取个人信息
export const getinfos = (data) => {
    return http({
        url: '/api/auth.user/getinfos',
        method: 'GET', //请求方法
        data //请求接口需要的参数
    })
}